// 导入所有API模块
import { useUserApi } from '~/api/modules/user';
import { useConsultApi } from '~/api/modules/consult';
import { useMessageApi } from '~/api/modules/message';
import { usePaymentApi } from '~/api/modules/payment';
import { useCommonApi } from '~/api/modules/common';

/**
 * 统一的API组合函数
 * 使用方式：const { getUserProfile } = useApi()
 */
export const useApi = () => {
  const userApi = useUserApi();
  const consultApi = useConsultApi();
  const messageApi = useMessageApi();
  const paymentApi = usePaymentApi();
  const commonApi = useCommonApi();

  return {
    // 扁平化导出，方便直接调用
    ...userApi,
    ...consultApi,
    ...messageApi,
    ...paymentApi,
    ...commonApi,
  };
};
